package com.minivision.fdiot.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Entity
@Setter
@Getter
@ToString
@EntityListeners(AuditingEntityListener.class)
public class Stats extends BaseEntity {

  private static final long serialVersionUID = -4671375417855157591L;

  @Column(nullable = false)
  @ApiModelProperty(value = "人脸库Token")
  private String facesetToken;
  @Column(nullable = false)
  @ApiModelProperty(value = "设备编号")
  private String deviceSn;
  @ApiModelProperty(value = "人脸Token")
  private String faceToken;
  @Column(nullable = false)
  @ApiModelProperty(value = "是否识别成功")
  private Boolean success;
  @ApiModelProperty(value = "抓拍照片链接")
  private String capImgUrl;
  @ApiModelProperty(value = "相似度")
  private Float confidence;
  
  @Column(nullable = false)
  @Temporal(TemporalType.TIMESTAMP)
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @ApiModelProperty(value = "识别时间")
  private Date detectTime;
  
}
